

<Serializable()> Public Enum TurnLength_cgd
    Hour = 0
    HalfDay = 1
    FullDay = 2
    Week = 3
    Month = 4
End Enum

<Serializable()> Public Enum IconImageIndex_cgd
    Owner = 0
    SameFaction = 1
    Allied = 2
    Neutral = 3
    Enemy = 4
End Enum

<Serializable()> Public Enum RuleApplies_cgd
    Constant = 0  ' always in effect, these rules should have NO max number of uses
    Combat = 1   ' only during combat can this rule be used. If it has 0 max uses, then it is a 'constant' in any combat
    NonCombat = 2 ' may only be used during the planning phase
End Enum

<Serializable()> Public Enum CaptureEvent_cgd
    ChangeOwnership = 0
    Hold = 1
    Destroyed = 2
End Enum

<Serializable()> Public Enum BattleResult_cgd
    Draw = 0
    AttackerVictory = 1
    DefenderVictory = 2
    AttackerMarginalVictory = 3
    DefenderMarginalVictory = 4
End Enum

<Serializable()> Public Enum DiplomaticStanding_cgd
    SameFaction = 0
    Allied = 1
    Neutral = 2
    Enemy = 3
End Enum

<Serializable()> Public Enum GroundUnitStatus_cgd
    OK = 0
    Engaged = 1
    Moving = 2
    Assembling = 3
    Reinforcing = 4
    Regrouping = 5
End Enum

<Serializable()> Public Class CampaignerGameData
    ' this class is the base for a game, its properties and collections define all elements in the campaign
    Private mvarDemo As Boolean
    Private mvarGameName As String
    Private mvarVersion As String
    Private mvarTheaterMapFilename As String = "None"
    Private mvarTurn As Int16
    Private mvarTurnLength As TurnLength_cgd
    Private mvarMaxTurns As Int16
    Private mvarUsesZOC As Boolean = False
    Private mvarSystemValues As New Hashtable()
    '<laziness>
    Public Orders_g As New OrderTypes()
    Public Faction_g As New Factions()
    Public RuleTypes_g As New RuleTypes()
    Public Rules_g As New Rules()
    Public ResourceTypes_g As New ResourceTypes()
    Public Resources_g As New Resources()
    Public Messages_g As New Messages()
    Public DeploymentZones_g As New DeploymentZones()
    Public Battles_g As New Battles()
    Public Diplomacy_g As New Diplomacy()
    Public MapLabels_g As New MapLabels()
    Public AllChits As New Hashtable(10)        ' this holds all instances of objectives, units and tokens
    '</laziness>   >:P

    ' four letter key combinations for hashtable lookups
    Public Const CGDKEY_OBJECTIVETYPE = "OBJT"
    Public Const CDGKEY_RESOURCETYPE = "REST"
    Public Const CDGKEY_RULETYPE = "RULET"
    Public Const CDGKEY_UNITTYPE = "UNTT"
    Public Const CDGKEY_TOKENTYPE = "TOKT"

    Public Const CDGKEY_OBJECTIVE = "OBJE"
    Public Const CDGKEY_RESOURCE = "RESO"
    Public Const CDGKEY_RULE = "RULE"
    Public Const CDGKEY_UNIT = "UNIT"
    Public Const CDGKEY_TOKEN = "TOKN"

    Public Sub Save(ByVal Filepath As String)
        ' serialize and save

    End Sub

    Public Sub Open(ByVal Filepath As String)


    End Sub


#Region "Property Declarations"
    Public ReadOnly Property Demo() As Boolean
        Get
            Return mvarDemo
        End Get
    End Property

    Public Property GameName() As String
        Get
            Return mvarGameName
        End Get
        Set(ByVal Value As String)
            mvarGameName = Value
        End Set
    End Property

    Public Property Version() As String
        Get
            Return mvarVersion
        End Get
        Set(ByVal Value As String)
            mvarVersion = Value
        End Set
    End Property

    Public Property TheaterMapFilename() As String
        Get
            Return mvarTheaterMapFilename
        End Get
        Set(ByVal Value As String)
            mvarTheaterMapFilename = Value
        End Set
    End Property

    Public Property Turn() As Int16
        Get
            Return mvarTurn
        End Get
        Set(ByVal Value As Int16)
            mvarTurn = Value
        End Set
    End Property

    Public Property TurnLength() As TurnLength_cgd
        Get
            Return mvarTurnLength
        End Get
        Set(ByVal Value As TurnLength_cgd)
            mvarTurnLength = Value
        End Set
    End Property

    Public Property MaxTurns() As Int16
        Get
            Return mvarMaxTurns
        End Get
        Set(ByVal Value As Int16)
            mvarMaxTurns = Value
        End Set
    End Property

    Public Property UsesZOC() As Boolean
        Get
            Return mvarUsesZOC
        End Get
        Set(ByVal Value As Boolean)
            mvarUsesZOC = Value
        End Set
    End Property

    Public Property SystemValue(ByVal Key As String) As String
        Get
            ' returns the item associated with the key or a "NoItem" return value
            Dim item As Object
            Try
                item = mvarSystemValues(Key)
                If item Is Nothing Then
                    Return "NoItem"
                Else
                    Return item
                End If
            Catch
                Return "NoItem"
            End Try
        End Get
        Set(ByVal Value As String)
            ' updates or add the value with the associated key
            Try
                mvarSystemValues(Key) = Value
            Catch
                mvarSystemValues.Add(Key, Value)
            End Try
        End Set
    End Property

#End Region

End Class

' chit classes and such
<Serializable()> Public MustInherit Class ChitType

    Private mvarMapID As Int16
    Private mvarLocation As Point
    Private mvarName As String
    Private mvarDescription As String
    Private mvarIcons As New Hashtable(5)   ' Icons are: Owner, SameFaction, Allied, Neutral, Enemy

    Public Property MapID() As Int16
        Get
            Return mvarMapID
        End Get
        Set(ByVal Value As Int16)
            mvarMapID = Value
        End Set
    End Property

    Public Property Location() As Point
        Get
            Return mvarLocation
        End Get
        Set(ByVal Value As Point)
            mvarLocation = Value
        End Set
    End Property

    Public Property [Name]() As String
        Get
            Return mvarName
        End Get
        Set(ByVal Value As String)
            mvarName = Value
        End Set
    End Property

    Public Property Description() As String
        Get
            Return mvarDescription
        End Get
        Set(ByVal Value As String)
            mvarDescription = Value
        End Set
    End Property

    Public Property Icon(ByVal key As String) As Bitmap
        Get
            Return mvarIcons(key)
        End Get
        Set(ByVal Value As Bitmap)
            mvarIcons(key) = Value
        End Set
    End Property

End Class

<Serializable()> Public MustInherit Class GroundChitType
    Inherits ChitType

    Private mvarTypeID As Int16
    Private mvarTypeName As String
    Private mvarLOS As Int16
    Private mvarLOSPower As Int16
    Private mvarSize As Int16

    Public Overrides Function ToString() As String
        Return mvarTypeName
    End Function

    Public Property TypeID() As Int16
        Get
            Return mvarTypeID
        End Get
        Set(ByVal Value As Int16)
            mvarTypeID = Value
        End Set
    End Property

    Public Property TypeName() As String
        Get
            Return mvarTypeName
        End Get
        Set(ByVal Value As String)
            mvarTypeName = Value
        End Set
    End Property

    Public Property LOS() As Int16
        Get
            Return mvarLOS
        End Get
        Set(ByVal Value As Int16)
            mvarLOS = Value
        End Set
    End Property

    Public Property LOSPower() As Int16
        Get
            Return mvarLOSPower
        End Get
        Set(ByVal Value As Int16)
            mvarLOSPower = Value
        End Set
    End Property

    Public Property Size() As Int16
        Get
            Return mvarSize
        End Get
        Set(ByVal Value As Int16)
            mvarSize = Value
        End Set
    End Property

End Class

<Serializable()> Public Class ObjectiveType
    Inherits GroundChitType

    Private mvarObjectiveRules As New Rules()

    Public Property ObjectiveRules() As Rules
        Get
            Return mvarObjectiveRules
        End Get
        Set(ByVal Value As Rules)
            mvarObjectiveRules = Value
        End Set
    End Property

End Class

<Serializable()> Public Class UnitType
    Inherits GroundChitType
    Private mvarMovementClassID As Int16
    Private mvarMovementSpeed As Int16
    Private mvarStatus As GroundUnitStatus_cgd
    Private mvarOrder As String
    Private mvarWaypoints As New ArrayList(6) ' array of points

    Public Property MovementClassID() As Int16
        Get
            Return mvarMovementClassID
        End Get
        Set(ByVal Value As Int16)
            mvarMovementClassID = Value
        End Set
    End Property

    Public Property MovementSpeed() As Int16
        Get
            Return mvarMovementSpeed
        End Get
        Set(ByVal Value As Int16)
            mvarMovementSpeed = Value
        End Set
    End Property

    Public Property Status() As GroundUnitStatus_cgd
        Get
            Return mvarStatus
        End Get
        Set(ByVal Value As GroundUnitStatus_cgd)
            mvarStatus = Value
        End Set
    End Property

    Public Property Order() As String
        Get
            Return mvarOrder
        End Get
        Set(ByVal Value As String)
            mvarOrder = Value
        End Set
    End Property

    Public Property Waypoint(ByVal Index As Int16) As Point
        Get
            Try
                Return mvarWaypoints(Index)
            Catch
                Debug.WriteLine("Index out of bounds in UnitType.Waypoint")
            End Try
        End Get
        Set(ByVal Value As Point)
            Try
                mvarWaypoints(Index) = Value
            Catch
                Debug.WriteLine("Index out of bounds in UnitType.Waypoint")
            End Try
        End Set
    End Property

End Class

<Serializable()> Public Class TokenType
    Inherits UnitType

    Public TokenRule As New Rule()

End Class



<Serializable()> Public Class RuleType
    Private mvarRuleTypeID As Int16
    Private mvarRuleName As String
    Private mvarBasicRange As Int16
    Private mvarAppliesDuring As RuleApplies_cgd = RuleApplies_cgd.Constant
    Private mvarMaxUses As Int16 ' non zero denotes number of uses per turn
    Private mvarResourceID As Int16 = -1 ' none as default, points to the correct resourceid if it generates a resource
    Private mvarRuleText As String

    Public Overrides Function ToString() As String
        Return mvarRuleName
    End Function

#Region "Property Declarations"
    Public Property RuleTypeID() As Int16
        Get
            Return mvarRuleTypeID
        End Get
        Set(ByVal Value As Int16)
            mvarRuleTypeID = Value
        End Set
    End Property

    Public Property RuleName() As String
        Get
            Return mvarRuleName
        End Get
        Set(ByVal Value As String)
            mvarRuleName = Value
        End Set
    End Property

    Public Property BasicRange() As Int16
        Get
            Return mvarBasicRange
        End Get
        Set(ByVal Value As Int16)
            mvarBasicRange = Value
        End Set
    End Property

    Public Property AppliesDuring() As RuleApplies_cgd
        Get
            Return mvarAppliesDuring
        End Get
        Set(ByVal Value As RuleApplies_cgd)
            mvarAppliesDuring = Value
        End Set
    End Property

    Public Property MaxUses() As Int16
        Get
            Return mvarMaxUses
        End Get
        Set(ByVal Value As Int16)
            mvarMaxUses = Value
        End Set
    End Property

    Public Property ResourceID() As Int16
        Get
            Return mvarResourceID
        End Get
        Set(ByVal Value As Int16)
            mvarResourceID = Value
        End Set
    End Property

    Public Property RuleText() As String
        Get
            Return mvarRuleText
        End Get
        Set(ByVal Value As String)
            mvarRuleText = Value
        End Set
    End Property
#End Region

End Class

<Serializable()> Public Class RuleTypes
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As RuleType
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in RuleTypes Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As RuleType, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub

End Class



<Serializable()> Public Structure Rule
    ' this is a particular instance of a rule for an objective or token, to be stuffed into the owning object's Rules property
    Public ruleTypeID As Int16
    Public ruleName As String
    Public currentUses As Int16
    Public ruleResource As Resource

    Public Overrides Function ToString() As String
        Return ruleName
    End Function

End Structure

<Serializable()> Public Class Rules
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As Rule
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in Rules Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As Rule, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub

End Class



<Serializable()> Public Class ResourceType
    Private mvarResourceTypeID As Int16
    Private mvarResourceName As String
    Private mvarResourceDescription As String

    Public Overrides Function ToString() As String
        Return mvarResourceName
    End Function

    Public Property ResourceTypeID() As Int16
        Get
            Return mvarResourceTypeID
        End Get
        Set(ByVal Value As Int16)
            mvarResourceTypeID = Value
        End Set
    End Property

    Public Property ResourceName() As String
        Get
            Return mvarResourceName
        End Get
        Set(ByVal Value As String)
            mvarResourceName = Value
        End Set
    End Property

    Public Property ResourceDescription() As String
        Get
            Return mvarResourceDescription
        End Get
        Set(ByVal Value As String)
            mvarResourceDescription = Value
        End Set
    End Property

End Class

<Serializable()> Public Class ResourceTypes
    Private mcol As Hashtable

    Public Function Item(ByVal sKey As String) As ResourceType
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in ResourceTypes Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As ResourceType, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub

End Class



<Serializable()> Public Class Resource
    Private mvarResourceTypeID As Int16
    Private mvarMaxAmount As Int16
    Private mvarAccrues As Boolean
    Private mvarAccrueAmount As Int16
    Private mvarCurrentAmount As Int16
    Private mvarResourceName As String

    Public Overrides Function ToString() As String
        Return mvarResourceName
    End Function

    Public Property ResourceTypeID() As Int16
        Get
            Return mvarResourceTypeID
        End Get
        Set(ByVal Value As Int16)
            mvarResourceTypeID = Value
        End Set
    End Property

    Public Property MaxAmount() As Int16
        Get
            Return (mvarMaxAmount)
        End Get
        Set(ByVal Value As Int16)
            mvarMaxAmount = Value
        End Set
    End Property

    Public Property Accrues() As Boolean
        Get
            Return mvarAccrues
        End Get
        Set(ByVal Value As Boolean)
            mvarAccrues = Value
        End Set
    End Property

    Public Property AccrueAmount() As Int16
        Get
            Return (mvarAccrueAmount)
        End Get
        Set(ByVal Value As Int16)
            mvarAccrueAmount = Value
        End Set
    End Property

    Public Property CurrentAmount() As Int16
        Get
            Return mvarCurrentAmount
        End Get
        Set(ByVal Value As Int16)
            mvarCurrentAmount = Value
        End Set
    End Property

    Public Property ResourceName() As String
        Get
            Return mvarResourceName
        End Get
        Set(ByVal Value As String)
            mvarResourceName = Value
        End Set
    End Property

End Class

<Serializable()> Public Class Resources
    ' collection of resource objects
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As Resource
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in Resources Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As Resource, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub

End Class


<Serializable()> Public Structure OrderType
    Public OrderID As Int16
    Public OrderName As String

    Public Overrides Function ToString() As String
        Return OrderName
    End Function
End Structure

<Serializable()> Public Class OrderTypes
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As OrderType
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in OrderTypes Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As OrderType, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub
End Class


<Serializable()> Public Class Faction
    Private mvarFactionID As Int16
    Private mvarFactionName As String
    Private mvarFactionDescription As String

    Public Overrides Function ToString() As String
        Return mvarFactionName
    End Function

    Public Property FactionID() As Int16
        Get
            Return mvarFactionID
        End Get
        Set(ByVal Value As Int16)
            mvarFactionID = Value
        End Set
    End Property

    Public Property FactionName() As String
        Get
            Return mvarFactionName
        End Get
        Set(ByVal Value As String)
            mvarFactionName = Value
        End Set
    End Property

    Public Property FactionDescription() As String
        Get
            Return mvarFactionDescription
        End Get
        Set(ByVal Value As String)
            mvarFactionDescription = Value
        End Set
    End Property
End Class

<Serializable()> Public Class Factions
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As Faction
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in Factions Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As Faction, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub
End Class


<Serializable()> Public Class Message
    Private mvarMessageID As Int16
    Private mvarSendingPlayerID As Int16
    Private mvarReceivingPlayerID As Int16
    Private mvarTitle As String
    Private mvarMessage As String
    Private mvarTurnActive As Int16
    Private mvarViewed As Boolean

    Public Overrides Function ToString() As String
        Return mvarTitle
    End Function

    Public Property MessageID() As Int16
        Get
            Return mvarMessageID
        End Get
        Set(ByVal Value As Int16)
            mvarMessageID = Value
        End Set
    End Property

    Public Property SendingPlayerID() As Int16
        Get
            Return mvarSendingPlayerID
        End Get
        Set(ByVal Value As Int16)
            mvarSendingPlayerID = Value
        End Set
    End Property

    Public Property ReceivingPlayerID() As Int16
        Get
            Return mvarReceivingPlayerID
        End Get
        Set(ByVal Value As Int16)
            mvarReceivingPlayerID = Value
        End Set
    End Property

    Public Property Title() As String
        Get
            Return mvarTitle
        End Get
        Set(ByVal Value As String)
            mvarTitle = Value
        End Set
    End Property

    Public Property Message() As String
        Get
            Return mvarMessage
        End Get
        Set(ByVal Value As String)
            mvarMessage = Value
        End Set
    End Property

    Public Property TurnActive() As Int16
        Get
            Return mvarTurnActive
        End Get
        Set(ByVal Value As Int16)
            mvarTurnActive = Value
        End Set
    End Property

    Public Property Viewed() As Boolean
        Get
            Return mvarViewed
        End Get
        Set(ByVal Value As Boolean)
            mvarViewed = Value
        End Set
    End Property
End Class

<Serializable()> Public Class Messages
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As Campaigner.Message
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in Messages Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As Campaigner.Message, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub
End Class


<Serializable()> Public Class DeploymentZone
    Private mvarZoneID As Int16
    Private mvarZoneName As String
    Private mvarLocation As Point
    Private mvarActive As Boolean = False
    Private mvarFactionID As Int16 = -1
    Private mvarCapturable As Boolean = False
    Private mvarCaptureEvent As CaptureEvent_cgd = CaptureEvent_cgd.ChangeOwnership
    Private mvarCaptured As Boolean = False
    Private mvarMaxDeploymentPerTurn As Int16 = -1    ' no maximum
    Private mvarMaxTotalDeploy As Int16 = -1               ' no max

    Public Overrides Function ToString() As String
        Return mvarZoneName
    End Function

    Public Property ZoneID() As Int16
        Get
            Return mvarZoneID
        End Get
        Set(ByVal Value As Int16)
            mvarZoneID = Value
        End Set
    End Property

    Public Property ZoneName() As String
        Get
            Return mvarZoneName
        End Get
        Set(ByVal Value As String)
            mvarZoneName = Value
        End Set
    End Property

    Public Property Location() As Point
        Get
            Return mvarLocation
        End Get
        Set(ByVal Value As Point)
            mvarLocation = Value
        End Set
    End Property

    Public Property Active() As Boolean
        Get
            Return mvarActive
        End Get
        Set(ByVal Value As Boolean)
            mvarActive = Value
        End Set
    End Property

    Public Property FactionID() As Int16
        Get
            Return mvarFactionID
        End Get
        Set(ByVal Value As Int16)
            mvarFactionID = Value
        End Set
    End Property

    Public Property Capturable() As Boolean
        Get
            Return mvarCapturable
        End Get
        Set(ByVal Value As Boolean)
            mvarCapturable = Value
        End Set
    End Property

    Public Property CaptureEvent() As CaptureEvent_cgd
        Get
            Return mvarCaptureEvent
        End Get
        Set(ByVal Value As CaptureEvent_cgd)
            mvarCaptureEvent = Value
        End Set
    End Property

    Public Property Captured() As Boolean
        Get
            Return mvarCaptured
        End Get
        Set(ByVal Value As Boolean)
            mvarCaptured = Value
        End Set
    End Property

    Public Property MaxDeploymentPerTurn() As Int16
        Get
            Return mvarMaxDeploymentPerTurn
        End Get
        Set(ByVal Value As Int16)
            mvarMaxDeploymentPerTurn = Value
        End Set
    End Property

    Public Property MaxTotalDeploy() As Int16
        Get
            Return mvarMaxTotalDeploy
        End Get
        Set(ByVal Value As Int16)
            mvarMaxTotalDeploy = Value
        End Set
    End Property

End Class

<Serializable()> Public Class DeploymentZones
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As DeploymentZone
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in DeploymentZones Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As DeploymentZone, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub
End Class


<Serializable()> Public Class Battle
    Private mvarBattleID As Int16
    Private mvarAttackingChitID As Int16
    Private mvarDefendingChitID As Int16
    Private mvarAttackingChitInitiative As Int16
    Private mvarDefendingChitInitiative As Int16
    Private mvarBattleResult As BattleResult_cgd

    Public Overrides Function ToString() As String
        Return "Battle " & mvarBattleID
    End Function

    Public Property BattleID() As Int16
        Get
            Return mvarBattleID
        End Get
        Set(ByVal Value As Int16)
            mvarBattleID = Value
        End Set
    End Property

    Public Property AttackingChitID() As Int16
        Get
            Return mvarAttackingChitID
        End Get
        Set(ByVal Value As Int16)
            mvarAttackingChitID = Value
        End Set
    End Property

    Public Property DefendingChitID() As Int16
        Get
            Return mvarDefendingChitID
        End Get
        Set(ByVal Value As Int16)
            mvarDefendingChitID = Value
        End Set
    End Property

    Public Property AttackingChitInitiative() As Int16
        Get
            Return mvarAttackingChitInitiative
        End Get
        Set(ByVal Value As Int16)
            mvarAttackingChitInitiative = Value
        End Set
    End Property

    Public Property DefendingChitInitiative() As Int16
        Get
            Return mvarDefendingChitInitiative
        End Get
        Set(ByVal Value As Int16)
            mvarDefendingChitInitiative = Value
        End Set
    End Property

    Public Property BattleResult() As BattleResult_cgd
        Get
            Return mvarBattleResult
        End Get
        Set(ByVal Value As BattleResult_cgd)
            mvarBattleResult = Value
        End Set
    End Property

End Class

<Serializable()> Public Class Battles
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As Battle
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in Battles Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As Battle, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub
End Class


<Serializable()> Public Class Diplomacy
    ' each faction should be represented, but for now, everyone HATES everyone!!! hahahahahahaha

    Public Property DiplomaticStanding(ByVal Faction1 As Int16, ByVal Faction2 As Int16) As DiplomaticStanding_cgd
        Get
            Return DiplomaticStanding_cgd.Enemy
        End Get
        Set(ByVal Value As DiplomaticStanding_cgd)

        End Set
    End Property
End Class


<Serializable()> Public Class MapLabel
    Private mvarMapLabelID As Int16
    Public LabelText As String
    Public LabelColor As Color = Color.WhiteSmoke
    Public Location As Point
    Public MapID As Int16
    Public Visible As Boolean = True

    Public Overrides Function ToString() As String
        Return LabelText
    End Function

    Public Property MapLabelID() As Int16
        Get
            Return mvarMapLabelID
        End Get
        Set(ByVal Value As Int16)
            mvarMapLabelID = Value
        End Set
    End Property

End Class

<Serializable()> Public Class MapLabels
    Private mcol As New Hashtable()

    Public Function Item(ByVal sKey As String) As MapLabel
        Try
            Return mcol(sKey)
        Catch
            Debug.WriteLine("Could not find item '" & sKey & "' in MapLabels Collection.")
        End Try
    End Function

    Public Sub Add(ByVal Item As MapLabel, ByVal sKey As String)
        mcol.Add(sKey, Item)
    End Sub
End Class